package hng.constants;

public class Constants {
    public static final Long MB = 1024 * 1024L;

    // 图形验证码有效期10分钟
    private static final long CAPTCHA_CODE_EXPIRED = 60 * 1000 * 10;

    // redis的key
    public static final Integer REDIS_KEY_EXPRIRES_ONE_MIN = 60;

    public static final Integer REDIS_KEY_EXPRIRES_DAY = REDIS_KEY_EXPRIRES_ONE_MIN * 60 * 24;

    public static final Integer REDIS_KEY_EXPIRES_ONE_HOUR = REDIS_KEY_EXPRIRES_ONE_MIN * 60;

    public static final Integer REDIS_KEY_EXPIRES_FIVE_MIN = REDIS_KEY_EXPRIRES_ONE_MIN * 5;

    public static final String REDIS_KEY_TOKEN = "hng:token:%s";

    public static final String REDIS_KEY_CAPTCHA = "hng:captcha:type:%s";

    public static final String REDIS_KEY_PHONE_CODE = "hng:phone:%s";

    public static final String REDIS_KEY_ORDER = "hng:order:%s";

}
